<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template/DefaultTemplate.xhtml">

        <ui:define name="content">

            <h:form>
                <p:panel toggleable="true" id="marketReport" header="Create a new Market Sales Report">
                    <h:panelGrid columns="3">
                       

                        <h:outputLabel value="Year " />
                        <p:inputText id="name" value="#{expectedYearOnYearGrowthEntityController.currentReport.year}"  required="true" requiredMessage="Year is missing" 
                        />
                        <h:message styleClass="errorMsg" for= "name"/>
                        
                        <h:outputLabel value="Sales Type "  />
                        <h:selectOneMenu id="salesType" value="#{expectedYearOnYearGrowthEntityController.currentReport.salesType}" title="salesType"  >
                            <f:selectItems value="#{expectedYearOnYearGrowthEntityController.marketSalesType}"/>
                             
                        </h:selectOneMenu>  
                         <h:message styleClass="errorMsg" for= "salesType"/>

                        <h:outputLabel value="Sales Value "  />
                        <p:inputText id="salesValue" value="#{expectedYearOnYearGrowthEntityController.currentReport.salesValue}"  required="true" requiredMessage="Sales Value is missing" />
                        <h:message styleClass="errorMsg" for= "salesValue"/>
                        
                        
                        
                    </h:panelGrid>
                </p:panel>
                <br/>

                <p:commandButton ajax="false" value="Create" action="#{expectedYearOnYearGrowthEntityController.createMarketSalesReport}"/>
                
                <p:commandButton action="#{expectedYearOnYearGrowthEntityController.prepareListMarketSalesReport}" value="Back"  ajax="false" immediate="true"/>
            </h:form>
            
        </ui:define>
    </ui:composition>

</html>
